<template>
  <div class="aside-bg">
    <el-menu
      default-active="1"
      class="el-menu-vertical-demo"
      style="height: 100%"
      background-color="rgb(50,65,87)"
      text-color="#fff"
      active-text-color="rgb(30,172,255)">

      <div v-for="(n,i) in myNodeList">

        <el-menu-item :index="i+1+''" @click="toGo(n.path)" v-if="n.type == userType">
          <i :class="n.icon"></i>
          <span slot="title">{{n.name}}</span>
        </el-menu-item>
      </div>
    </el-menu>
  </div>
</template>

<script>

  import {myNode} from "../../common/MyNode";

  export default {
    name: "Aside",
    data() {
      return {
        userType: this.$store.getters.getUser.type,
        myNodeList: myNode
      }
    },
    methods:{
      toGo(path){
        this.$router.push({
          name:path
        })
      }
    }
  }
</script>

<style scoped>


</style>
